-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Point rotation #3854
base: master
Are you sure you want to change the base?
Point rotation #3854
Conversation
- Consider point rotatable - Transform graphics item - Rotate reference arrow position - Rotate selection outline - Let selection tool rotate but not resize single point - Always use point position as the rotate origin - Unlock rotation property on point
Fixes going to resize mode instead of rotate mode when creating new point object.
I don't think it makes sense for points to have a direction. Points are points, they are not lines or vectors. If your goal is to visualise vectors, then I think a new vector type with different visualisation would be a clearer option. I do like the idea of having a way to clearly display multiple points at a location, but I feel this would be better solved by smarter handling of the labels than by giving points rotation. |
I know mathematically a "directed point" isn't a thing, but looking at a map editor as a creativity tool, I'd think enabling more ways to be creative with shapes is worth it. I could add a choice of point appearances. I'd rather that than implement a new shape type logically identical to a point except for having rotation. For starters the choices would be either the current appearance, or a dot with attached arrowhead for the "directed point" case. Later on this option could be expanded with more point shapes you could use for classification and personalization. It would be a property of each point, and later there could be a default setting in editor preferences or project settings. I think I see what you mean by handling the labels, maybe auto arranging them to not overlap but that doesn't help with clicking a specific one unless we allow clicking its label to select it. |
I think vectors would be better as a new object type because they have two things Points don't: direction and length. So, vectors are really closer to Polylines than to Points, since they can be described as two points xP And if we run with that comparison, then perhaps a Vector Object could consist of two points - its position (the base of the arrow), and a second point indicating its length and direction (the tip of the arrow), and they could potentially be manipulated independently, with entirely different controls than for Points. Unlike a Polyline, however, it would store Length and Direction rather than the coordinates of the second point. The Direction would be equivalent to Rotation, just with a more appropriate name for the context. Arguably, vectors also call for a third difference from Points: a scale factor. It's common for vectors to use units other than those used for sizes, but the user may still want to conveniently manipulate/visualise them, and thus may want to set a multiplier so that the handles aren't too distant or too small. For example, if I'm implementing jump pads, I may want to scale the vector preview so it shows the approximate distance it will send the player, which will be in the tens or hundreds of pixels, rather than the impulse that vector represents, which may be in the thousands, way off the map if shown as pixels. I should've been clearer with the "labels" bit - I meant not only the text labels, but the drawn points as well - those are also labels, since they are not themselves the Point, but sit offset from it. That is, I think rotating the points in this way should be something Tiled does automatically (possibly based on zoom level), without storing it in the map file. I realise I'm asking for a lot here - I don't expect you to implement any of this. I can see the usefulness of the feature as you've added it, but I think that as a merged Tiled feature rather than a local change, it would be better to have something more substantial which doesn't conflict with the usual understanding of a Point. Perhaps I should open an issue requesting Vector Objects? |
Some use cases: